package com.durian.domain.DTO;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.*;

/**
 * 添加购物车 DTO
 *
 * @author Durian
 * @since 2023/12/6
 */
@Data
@Builder
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class ObsShopcarAddDTO {

    /**
     * 用户id
     */
    @Positive(message = "id格式不对")
    @NotNull(message = "用户id不能为空")
    private Long userId;

    /**
     * 地址id
     */
    @Positive(message = "id格式不对")
    @NotNull(message = "地址id不能为空")
    private Long addressId;

    /**
     * 书籍id
     */
    @Positive(message = "id格式不对")
    @NotNull(message = "书籍id不能为空")
    private Long bookId;

    /**
     * 书籍数量
     */
    private Integer bookCount;

}
